<script type="text/javascript">

$(function(){

	$("<?php echo '#template'.$wid?>").change(function(){
		if($('<?php echo '#template'.$wid?>').val()=='diary'){
			alert($('.edit').length);
			//$('.edit').css("background","transparent url('http://simg.sinajs.cn/xblogtheme/images/1/1_5/wrap.png') repeat-y top center");
			$('.edit').addClass('edit-diary');
			//$('.core').addClass('core-diary');
			//$('.edit').attr('width','100px');
		}
	});
})

</script>
<table >
    <tbody>
	
    <tr>
    <td >风格</td>
    <td>

    <div class="">
    <select name="select" id="<?php echo 'template'.$wid?>">
    	<?php if(isset($style['template'])) {?>
        <option value="douban" <?php if($template=='douban'){?> selected="selected" <?php }?>>豆瓣风格</option>
        <option value="diary"  <?php if($template=='diary'){?> selected="selected" <?php }?>>日记风格</option>
		<option value="qing"  <?php if($template=='qing'){?> selected="selected" <?php }?>>轻微博风格</option>
		<?php }else{?>
    	<option value="douban" >豆瓣风格</option>
        <option value="diary"  >日记风格</option>
		<option value="qing" selected="selected" >轻微博风格</option>
    	<?php }?>
    </select>
    </div>
  </td>
    </tr>

    <tr>
    <td>背景色</td>
    <td >
    <div id="colorSelector "class="<?php echo 'colorSelector'.$wid?>">
      <div>ddd<div>
    </div>
  </td>
    </tr>

    <tr>
    	<td >背景图</td>
    <td>
	    <div class="<?php echo 'opacity'.$wid?>">
	    	<div  class="<?php echo 'slider'.$wid?>" name='opacity'></div>
	    </div>
    </td>
    </tr>
    
	<tr>
	    <td ><input type='button' value="加新页"></td>
	    <td ><input type='button' value="删除当前页"></td>
    </tr>
    
    </tbody>
   </table>